<%@page  import="javax.swing.JOptionPane" %>

<%@page  import="com.informet.ipd.modelo.dao.MainDao" %>
<%
            String pag = request.getParameter("num");


        
            String MM_authRestringidoURL = "restringido.jsp";

            boolean MM_grantRestringido = false;
            Object rest =  session.getAttribute("restringir");
            Object dep =  session.getAttribute("dependencia");
            Object  nuevo = (new MainDao().getCampo("select menu_id from permisos where rol_id=" + rest + " and menu_id=" + pag));

       
           
            if (!nuevo.equals("null")) {
                MM_grantRestringido = true;
            }

         
                if (!MM_grantRestringido) {
                    response.sendRedirect(response.encodeRedirectURL(MM_authRestringidoURL));

             
            }

%>